package com.usian.article.controller;

import com.usian.api.article.ApArticleContentControllerApi;
import com.usian.article.service.ApArticleContentService;
import com.usian.model.article.pojos.ApArticleContent;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/article_content")
public class ApArticleContentController implements ApArticleContentControllerApi {

    @Autowired
    private ApArticleContentService apArticleContentService;

    /**
     * admin 远程调用保存文章内容表
     *
     * @param apArticleContent
     * @return
     */
    @Override
    @PostMapping("/save")
    public ResponseResult saveArticleContent(@RequestBody ApArticleContent apArticleContent) {
        return apArticleContentService.saveArticleContent(apArticleContent);
    }
}
